FROM eclipse-temurin:8-jdk-focal
MAINTAINER biebbwa@163.com
ENV TZ=Asia/Shanghai \
    DEBIAN_FRONTEND=noninteractive
COPY ./base/wait-for-it.sh /usr/local/bin
RUN sed -i s@/archive.ubuntu.com/@/mirrors.tuna.tsinghua.edu.cn/@g /etc/apt/sources.list \
    && apt update \
    && apt install -y tzdata \
    && ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
    && echo ${TZ} > /etc/timezone \
    && dpkg-reconfigure --frontend noninteractive tzdata \
    && rm -rf /var/lib/apt/lists/* \
    && chmod +x /usr/local/bin/wait-for-it.sh
COPY ./target/renren-generator.jar /renren-generator.jar



WORKDIR /
ENTRYPOINT  wait-for-it.sh ${WAIT} -s -t 0 -- java -Djava.security.egd=file:/dev/./urandom  -jar renren-generator.jar  ${JAVA_OPTS}